<?php
error_reporting(0);
header("content-type:text/html;charset=utf-8");  //设置编码
$con = mysqli_connect("localhost","root","root","test6"); //连接数据库
if (!$con)
{
    die('连接失败: ' . mysqli_connect_error());
}

$num=$_GET['num'];
echo "Your Input is :".$num; //输出提交数据
echo "<H2>FLAG</H2>";
// 输入数据
echo "<h3>FLAG IS IN DATABASES???</h3>";
echo "<form method='GET' action='test6.php'>";
echo "<input type='text' name='num' value=''>";
echo "<input type='submit' name='submit' value='提交'><br>";
echo "</form>"; 
$_num=@$_POST['id'];
//查询数据并打印
$queryall="select *from users where id='$num'";
$resultall=mysqli_query($con, $queryall);
echo "<H2>Your IMESSAGE</H2>";
echo "<table border='1'>";
echo "<th>id</th>";
echo "<th>username</th>";
while($row1 = mysqli_fetch_array($resultall)){
		echo "<tr>";
		echo "<td>".$row1[0],"</td>";
		echo "<td>".$row1[1],"</td>";
		echo "</tr>";
	}
echo "</table>";
mysqli_close($con);
?>